<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ShareYouTubeMP3.com - Search</title>
<meta name="description" content="ShareYouTubeMP3.com - a free online YouTube to MP3 website to download music from YouTube.com." />
<link href="${cssRoot}/global.css" rel="stylesheet" type="text/css" />
<link href="${cssRoot}/ui/jquery-ui-1.8.17.custom.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="${cssRoot}/jquery.fancybox-1.3.4.css" media="screen" />
<script type="text/javascript" src="${jsRoot}/conf.js"></script>
<script type="text/javascript" src="${jsRoot}/google.js"></script>
<!--[if lt IE 7]>
<script type="text/javascript" src="js/iepng.js"></script>
<script type="text/javascript">
EvPNG.fix('div, ul, img, li, input, a, table, td, th, ol, dl, dt, dd, h1, h2, h3, h4, h5, h6, span');
</script>
<![endif]-->
</head>
<body>
<input type="hidden" id="contextPath" value="${request.contextPath}" />
<#include "/i18n/${locale}/head.ftl">
<div id="main2">
	<div class="seachform">
		<div class="sch_l"></div>
		<div class="sch_box">
	  		<div class="relation">${i18n("txtUrl_prompt")}</div>
	 		<div class="input-keyword">
	    		<div class="inputbox"><input id="txtUrl" class="search-keyword" type="text" onkeyup="inputOnkeyup(event);" /></div>
		    	<div class="sch-btn">
		      		<a href="javascript:;" onclick="parseMp3();">Convert MP3</a>
		    	</div>
	    		<div class="clear"></div>
	  		</div>
		</div>
		<div class="sch_r"></div>
		<div class="clear"></div>
	</div>
	
	<div id="resultTitle" class="s_rusult">
		<div class="s_words">Search results for <span id="queryWord" class="font2">${query}</span></div>
		<div id="resultCount" class="s_count"></div>
		<div class="clear"></div>
	</div>
	<!--search result-->
	<div id="result" class="result">
		<#if videoItems??>
			<#assign items = videoItems.items>
			<#include "/macro/utils.ftl">
			<#list items as item >
				<div class="s_mp3">
					<a href="http://www.youtube.com/v/${item.videoId}?fs=1&autoplay=1">
						<div class="s_mp3img">
							<img src="${item.thumbnail}" width="117" height="90" alt="${item.title}" />
						</div>
					</a>
					<div class="mp3_describe">
						<p><a href="http://www.youtube.com/v/${item.videoId}?fs=1&autoplay=1">${item.title}</a></p>
						<div class="describe">${item.description}</div>
						<div class="facets"> by  ${item.uploader}<span class="font3">&nbsp;|&nbsp;</span><@formatSeconds seconds=item.duration />
							<span class="font3">&nbsp;|&nbsp;</span>${item.viewCount} views
						</div>
					</div>
					<div class="convert">
						<a class="video" href="http://www.youtube.com/v/${item.videoId}?fs=1&autoplay=1">Play Video</a>
						<a class="convert-to-mp3" href="${request.contextPath}/convert/${item.videoId}">Convert to MP3</a>
					</div>
					<div class="clear"></div>
				</div>
			</#list>
		<#else>
			No Video found.
		</#if>
	</div>
	<div id="pageFooter" class="pages">
		<#if query != ''>
		<div id="pageFooter">			
			<#assign totalCount = videoItems.pagenate.totalCount>
			<#assign preUrl = request.contextPath + "/search/" + query>
			<#include "/macro/pager.ftl">			
			<@pager total=totalCount url=preUrl page=page len=pageSize/>			
		</div>
		</#if>
	</div>
	<div class="foot_g">
		<div class="foot_lt"></div>
		<div class="foot_cen"></div>
		<div class="foot_rt"></div>
	</div>
</div>
<!-- main end -->
<#include "/include/footer.ftl">
<script type="text/javascript" src="${jsRoot}/utils.js"></script>
<script type="text/javascript" src="${jsRoot}/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${jsRoot}/js.js"></script>
<script type="text/javascript" src="${jsRoot}/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="${jsRoot}/search.js"></script>
<script type="text/javascript" src="${jsRoot}/ui/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="${jsRoot}/prompt.js"></script>

<script type="text/javascript">
$(function(){
	initSite();
	initPrompt();
});	   
</script>
</body>
</html>
